Priors let us model with knowledge included:
The Beta distribution fits these requirements
shape1 in dbeta()shape2 in dbeta()dbeta(x, shape1, shape2) is the density of the Beta distribution for a vector x and the two shape parametersP probabilities from 0 to 1P, given shape1 and shape2 Pass FishID Date
1 0 5145 2017-07-12
2 0 5259 2017-07-12
3 0 5275 2017-07-12
4 0 5335 2017-07-12
5 0 5345 2017-07-12
6 0 5395 2017-07-12
Pass is 1: add 1 to aPass is 0: add 1 to b# A tibble: 72 × 3
a b Pass
<dbl> <dbl> <int>
1 1 1 NA
2 1 2 0
3 1 3 0
4 1 4 0
5 1 5 0
6 1 6 0
7 1 7 0
8 2 7 1
9 2 8 0
10 3 8 1
11 3 9 0
12 3 10 0
13 3 11 0
14 3 12 0
15 3 13 0
16 3 14 0
17 3 15 0
18 3 16 0
19 3 17 0
20 4 17 1
# … with 52 more rows
Pass FishID Date
8 0 5465 2017-07-12
66 0 495D 2018-07-17
64 0 48D5 2018-07-17
35 1 52E9 2017-08-09
65 0 495B 2018-07-17
50 0 52AF 2017-09-20
70 0 54F5 2018-07-17
23 0 5285 2017-08-09
67 0 54AF 2018-07-17
57 1 4895 2018-07-17
2 0 5259 2017-07-12
6 0 5395 2017-07-12
48 0 4ED5 2017-09-20
37 0 544D 2017-08-09
26 0 4D95 2017-08-09
71 0 550B 2018-07-17
14 0 50D5 2017-07-12
63 0 5509 2018-07-17
34 0 529D 2017-08-09
13 0 4EB5 2017-07-12
39 0 5159 2017-09-20
47 0 4E95 2017-09-20
22 0 5265 2017-08-09
38 0 5095 2017-09-20
17 0 53AD 2017-07-12
12 0 4D75 2017-07-12
19 1 5115 2017-08-09
56 0 542D 2017-09-20
20 0 5125 2017-08-09
46 0 5459 2017-09-20
58 1 4915 2018-07-17
42 0 5359 2017-09-20
44 0 5415 2017-09-20
33 0 526B 2017-08-09
5 0 5345 2017-07-12
3 0 5275 2017-07-12
7 1 5429 2017-07-12
10 0 4D65 2017-07-12
16 0 52D7 2017-07-12
36 0 53B5 2017-08-09
41 0 5249 2017-09-20
51 0 52BB 2017-09-20
61 0 4959 2018-07-17
25 0 5315 2017-08-09
69 0 54EB 2018-07-17
68 1 54DD 2018-07-17
1 0 5145 2017-07-12
30 0 51A5 2017-08-09
60 1 4929 2018-07-17
55 0 52EB 2017-09-20
45 0 5435 2017-09-20
52 0 52D9 2017-09-20
28 0 4EA5 2017-08-09
9 1 5469 2017-07-12
4 0 5335 2017-07-12
53 0 52DB 2017-09-20
24 0 5291 2017-08-09
15 0 526D 2017-07-12
32 1 522B 2017-08-09
59 0 4925 2018-07-17
27 0 4DD5 2017-08-09
54 0 52E5 2017-09-20
18 0 53D5 2017-07-12
49 0 525B 2017-09-20
62 0 5489 2018-07-17
29 0 512D 2017-08-09
43 0 5369 2017-09-20
11 0 4D6B 2017-07-12
21 0 5149 2017-08-09
40 0 5225 2017-09-20
31 0 51B5 2017-08-09
The order of the data does not matter
Different priors = Different posteriors
Not:
“There is a 95% probability that the true proportion falls between 0.06 and 0.22”.